@@ -161,17 +161,31 @@ |
||
| 161 | 161 |
<b>Options:</b> |
| 162 | 162 |
<pre><%= Utils.pretty_jsonify @agent.options || {} %></pre>
|
| 163 | 163 |
</p> |
| 164 |
- |
|
| 165 |
- <p id="memory" data-agent-id="<%= @agent.id %>"> |
|
| 166 |
- <b>Memory:</b> |
|
| 167 |
- <% if @agent.memory.present? %> |
|
| 168 |
- <i class="fa fa-spinner fa-pulse spinner"></i> |
|
| 169 |
- <i class="fa fa-trash action-icon clear"></i> |
|
| 170 |
- <% end %> |
|
| 171 |
- <pre class="memory"><%= Utils.pretty_jsonify @agent.memory || {} %></pre>
|
|
| 172 |
- </p> |
|
| 164 |
+ <button type="submit" class="btn btn-default" id="target">Reveal Memory</button> |
|
| 165 |
+ <button type="submit" class="btn btn-default" id="target1">Hide Memory</button> |
|
| 166 |
+ <div id="memorytoggle" class="hidden"> |
|
| 167 |
+ <p id="memory" data-agent-id="<%= @agent.id %>"> |
|
| 168 |
+ <b>Memory:</b> |
|
| 169 |
+ <% if @agent.memory.present? %> |
|
| 170 |
+ <i class="fa fa-spinner fa-pulse spinner"></i> |
|
| 171 |
+ <i class="fa fa-trash action-icon clear"></i> |
|
| 172 |
+ <% end %> |
|
| 173 |
+ <pre class="memory"><%= Utils.pretty_jsonify @agent.memory || {} %></pre>
|
|
| 174 |
+ </p> |
|
| 175 |
+ </div> |
|
| 173 | 176 |
</div> |
| 174 | 177 |
</div> |
| 175 | 178 |
</div> |
| 176 | 179 |
</div> |
| 177 | 180 |
</div> |
| 181 |
+ |
|
| 182 |
+ |
|
| 183 |
+<%= javascript_tag do %> |
|
| 184 |
+$( "#target" ).click(function() {
|
|
| 185 |
+ $("#memorytoggle").removeClass("hidden");
|
|
| 186 |
+}); |
|
| 187 |
+ |
|
| 188 |
+$( "#target1" ).click(function() {
|
|
| 189 |
+ $("#memorytoggle").addClass("hidden");
|
|
| 190 |
+}); |
|
| 191 |
+<% end %> |